package com.kust.smarhome.background.controller;


import com.kust.smarhome.background.common.lang.Result;
import com.kust.smarhome.background.model.UserAddress;
import com.kust.smarhome.background.service.IUserAddressService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author iAuzre
 * @since 2021-07-31
 */
@RestController
@RequestMapping("/address")
public class UserAddressController {

    @Resource
    private IUserAddressService userAddressService;

    @GetMapping("/getByOrderFormId/{id}")
    public Result getByOrderFormId(@PathVariable Integer id) {
        UserAddress userAddress = userAddressService.getById(id);

        return Result.succ(userAddress);
    }
}
